package Datastruct.Linked;

public class TestDualLinked {
    public static void main(String[] args) {

        BookNode bookNode1=new BookNode(1,"语文",10.5);
        BookNode bookNode2=new BookNode(2,"数学",15.2);
        BookNode bookNode3=new BookNode(3,"英语",12.7);
        BookNode bookNode4=new BookNode(4,"物理",13.1);
        BookNode bookNode5=new BookNode(5,"化学",16.7);
        DualLinkedList dualLinkedList=new DualLinkedList();

        dualLinkedList.addLast(bookNode1);
        dualLinkedList.addLast(bookNode2);
        dualLinkedList.addLast(bookNode3);
        dualLinkedList.addLast(bookNode4);
        dualLinkedList.addLast(bookNode5);

        System.out.println(dualLinkedList.toString());

        dualLinkedList.showLinked();
//        dualLinkedList.delNode(bookNode1);
//        dualLinkedList.showLinked();
//        dualLinkedList.addLast(bookNode1);
//        System.out.println(bookNode1);
        BookNode bookNode=new BookNode(1,"111",111);
        dualLinkedList.updateNode(bookNode);
        dualLinkedList.showLinked();
    }
}
